<nz-modal [(nzVisible)]="isVisible" [nzTitle]="l('edit_area')" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()"
  [nzOkLoading]="isOkLoading">
  <form nz-form [formGroup]="validateForm">
    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="areaID">{{l('area_no')}}</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <input nz-input formControlName="code" id="code" [(ngModel)]="area.code" [placeholder]="l('please_enter_area_no')">
        <nz-form-explain *ngIf="validateForm.get('code').dirty && validateForm.get('code').errors">{{l('please_enter_area_no')}}</nz-form-explain>
      </nz-form-control>
    </nz-form-item>
    <!-- <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="siteId">{{l('site_alone')}}</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <nz-select formControlName="siteId" [(ngModel)]="area.siteId" [nzPlaceHolder]="l('please_select_site')">
          <nz-option *ngFor="let option of sites" [nzValue]="option.id" [nzLabel]="option.houseName"></nz-option>
        </nz-select>
      </nz-form-control>
    </nz-form-item> -->
    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="warehouseId">{{l('warehousing_company')}}</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <nz-select formControlName="warehouseId" [(ngModel)]="area.warehouseId" [nzPlaceHolder]="l('select_warehousing_company')">
          <nz-option *ngFor="let option of companyList" [nzValue]="option.id" [nzLabel]="option.houseName"></nz-option>
        </nz-select>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="useType">{{l('area_effect')}}</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <nz-checkbox-group [ngModelOptions]="{standalone: true}" [(ngModel)]="checkStatusList"></nz-checkbox-group>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="longitude">{{l('longitude')}}</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <nz-input-number [(ngModel)]="area.longitude" formControlName="longitude" [nzMin]="1" [nzStep]="1"></nz-input-number>
        <nz-form-explain *ngIf="validateForm.get('longitude').errors">{{l('please_enter_longitude')}}</nz-form-explain>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="latitude">{{l('latitude')}}</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <nz-input-number [(ngModel)]="area.latitude" formControlName="latitude" [nzMin]="1" [nzStep]="1"></nz-input-number>
        <nz-form-explain *ngIf="validateForm.get('latitude').errors">{{l('please_enter_latitude')}}</nz-form-explain>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="radius">{{l('radius')}}({{l('meter')}})</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <nz-input-number [(ngModel)]="area.radius" formControlName="radius" [nzMin]="1" [nzStep]="1" [nzMax]="999999"></nz-input-number>
        <nz-form-explain *ngIf="validateForm.get('radius').errors">{{l('please_enter_radius')}}</nz-form-explain>
      </nz-form-control>
    </nz-form-item>
  </form>
</nz-modal>